import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
import React, { memo } from "react";
import { judgmentNewPhone } from "../../utils";
import styles from "./container.module.less";
import FullScreenNav from "../full-screen-nav";
import { useSelector } from "react-redux";
import classNames from "classnames";
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
function Container(props) {
    var _props_noPlace = props.noPlace, noPlace = _props_noPlace === void 0 ? false : _props_noPlace, rest = _object_without_properties(props, [
        "noPlace"
    ]);
    /** hack 主要用于解决手机端层级显示错误的问题 */ var maskOpen = useSelector(function(state) {
        return state.app.maskOpen;
    });
    return /*#__PURE__*/ _jsxs("div", _object_spread_props(_object_spread({
        className: styles.page
    }, rest), {
        children: [
            /*#__PURE__*/ _jsx(FullScreenNav, {
                onBack: props.onBack,
                className: classNames(styles.nav, maskOpen ? styles.z_0 : "")
            }),
            /*#__PURE__*/ _jsxs("div", {
                className: styles.container,
                children: [
                    props.children,
                    judgmentNewPhone() && !noPlace && /*#__PURE__*/ _jsx("div", {
                        className: styles.spacingIphone
                    })
                ]
            })
        ]
    }));
}
export default /*#__PURE__*/ memo(Container);

 //# sourceMappingURL=index.js.map